package com.example.f1;

import org.springframework.amqp.core.Queue;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

import javax.annotation.PostConstruct;
import java.util.Scanner;

@SpringBootApplication
public class main {
    @Autowired
    Producer producer;
    public static void main(String[] args) {
        SpringApplication.run(main.class, args);
    }
    @Bean
    public Queue queue(){
        return new Queue("helloworld",false);
    }
    @PostConstruct
    void test1(){
        producer.send();
        System.out.println("结束按一下");
        new Scanner(System.in).nextLine();
    }
}
